﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AFSharedLibrary;

namespace UIDesigner.SurfaceProperties.Operations
{
    public class DeleteProperties : IPropertyGroup
    {
        [System.Xml.Serialization.XmlIgnore()]
        protected DeleteOptions m_eObjectDeleteOptions;
        [System.Xml.Serialization.XmlIgnore()]
        protected ConfirmOptions m_objDeleteConfirmOptions;
        [System.Xml.Serialization.XmlIgnore()]
        protected IEventStateValue m_objDeleteState;
        [System.Xml.Serialization.XmlIgnore()]
        private PostActions m_ePostActions;

        public SurfaceButton Button
        {
            get
            {
                if (m_eObjectDeleteOptions == DeleteOptions.DeleteButton)
                {
                    return SurfaceButton.Delete;
                }
                else if (m_eObjectDeleteOptions == DeleteOptions.RemoveButton)
                {
                    return SurfaceButton.Delete;
                }
                else
                {
                    return SurfaceButton.None;
                }
            }
        }

        public PostActions PostActions
        {
            get { return m_ePostActions; }
            set { m_ePostActions = value; }
        }

        public ConfirmOptions DeleteConfirmOptions
        {
            get { return m_objDeleteConfirmOptions; }
            set { m_objDeleteConfirmOptions = value; }
        }

        public DeleteOptions DeleteOptions
        {
            get { return m_eObjectDeleteOptions; }
            set { m_eObjectDeleteOptions = value; }
        }

        [System.Xml.Serialization.XmlIgnore()]
        public IEventStateValue DeleteState
        {
            get
            {
                return m_objDeleteState;
            }

            set
            {
                m_objDeleteState = value;
            }
        }

        public DeleteProperties()
        {
        }

        public object Clone()
        {
            DeleteProperties objProperties = new DeleteProperties();

            objProperties.DeleteOptions = this.DeleteOptions;
            objProperties.DeleteConfirmOptions = this.DeleteConfirmOptions;
            objProperties.PostActions = this.PostActions;

            return objProperties;
        }
    }
}
